class Car:
    def __init__(self,type,no):
        self.type=type
        self.no=no
    def start(self):
        print('启动')
    def stop(self):
        print('停止')

class Taxi(Car):
    def __init__(self,type,no,department):
        super().__init__(type,no)
        self.department=department

    def start(self):
        print('重写了父类的启动方法')

class FamilyCar(Car):
    def __init__(self, type, no, name):
        super().__init__(type, no)
        self.name = name

    def stop(self):
        print('重写了父类的停止方法')

taxi=Taxi('大众','0001','交通部')
taxi.start()
taxi.stop()

